<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>VmallTop&nbsp;微一商城后台管理系统</title>
<include file="Public/header" />
</head>
<body>
 
    
 
        <div class="list_vmall_man">
        	<div class="list_vmall_le">
              <include file="Public/integralMenu" />
            </div>
            <div class="list_vmall_rig">
            	<div class="list_vmall_bort">
                	<table width="100%" border="1" cellspacing="1" cellpadding="1">
                      <tr>
                      
                       <!--  <td height="46"><a style="float:left; margin-left:10px;" href="<{:U('integral_add')}>" class="v_mall_q"><i class="v_mall_fi"></i>添加积分类型</a></td> -->
                      </tr>
                    </table>
					          <table width="100%" class="v_am_bor_t v_am_td" border="1" cellspacing="1" cellpadding="1">
                      <tr class="v_am_bg_top" height="30">
                        <td height="34" align="center" valign="middle" class="v_am_font">ID</td>
                        <td height="34" align="center" valign="middle" class="v_am_font">积分名称</td>
                        <td height="34" align="center" valign="middle" class="v_am_font">积分</td>
                        <td height="34" align="center" valign="middle" class="v_am_font" style="border-right:0;">操作</td>
                      </tr>
                     <volist name="data" id="vo">
                      <tr>
                        <td height="36" align="center" valign="middle"><{$vo.id}></td>
                        <td height="36" align="center" valign="middle"><{$vo.name}></td>
                        <td height="36" align="center" valign="middle"><{$vo.num}></td>
                        <td style="border-right:0;"  height="36" align="center" valign="middle">

                           <if condition="$vo['keyword'] eq 'qiandao'">
                             <a onclick="qiandao()" class="btn"><i class="v_mall_tubg v_mall_tj2"></i>&nbsp;开启签到规格</a>
                           </if>
                           <if condition="$vo['status'] eq 1">
                              <a  href="<{:U('save',array('id'=> $vo['id'],'status'=>2))}>" class="btn"><i class="v_mall_tubg v_mall_tj2"></i>&nbsp;关闭</a>
                           <else />
                              <a  href="<{:U('save',array('id'=> $vo['id'],'status'=>1))}>" class="btn"><i class="v_mall_tubg v_mall_tj2"></i>&nbsp;开启</a>
                           </if>
                            <a  href="<{:U('integral_add',array('id'=> $vo['id']))}>" class="btn"><i class="v_mall_tubg v_mall_tj2"></i>&nbsp;编辑</a>
                            <!-- <a  href="<{:U('integral_delete',array('id'=> $vo['id']))}>" onclick="return confirm('确认需要删除些信息吗？');" class="btn"><i class="v_mall_tubg v_mall_tj3"></i>&nbsp;删除</a> -->
                        </td>
                      </tr>
                      </volist>  
                    
                    </table>
					
                   <include file="./Apps/BoxAdmin/View/Ace/Public/pager.html" />

                
                </div>
            </div>
       
        
    </div>


    <div class="notice" style="min-width:400px;min-height:160px;">
        <form id="form1" action="<{:U('qiandao_add')}>" method="post">
        <div class="title">添加每天签到规则<span>×</span></div>
        <a class="add" onclick="add()">添加规则</a>

        <div id="gg">

           <if condition="$qd">
             <volist name="qd" id="vo">
             <div class="gg">连续签到<input type="text" class="datenum" name="datenum[]" style="width:50px;height:20px;padding:0" value="<{$vo['datenum']}>"  />天----加<input type="text" class="integral" name="integral[]" style="width:50px;height:20px;padding:0" value="<{$vo['integral']}>" />分<input class="del" type="button" value="删除" onclick="del(this)" /></div>
             </volist>
           </if>
          
        </div>

         <div class="button">
        
         <button class="v_mall_q_1 yes" type="submit" style="border:0; height:32px; padding-top:0; cursor:pointer;">确  定</button>
             <button class="v_mall_q_1 colse" type="button" style="border:0; height:32px; padding-top:0; cursor:pointer;background: #C0C0C0;">取　消</button>
         </div>   
        </form>  
    </div>         




    <script type="text/javascript">
        function qiandao(){
           $('.notice').show();
        }
        function add(){
           if($('.gg').length>5) return false;
           $('<div class="gg">连续签到<input type="text" class="datenum" name="datenum[]" style="width:50px;height:20px;padding:0"  />天----加<input type="text" class="integral" name="integral[]" style="width:50px;height:20px;padding:0"  />分<input class="del" type="button" value="删除" onclick="del(this)" /></div>').appendTo($('#gg'));
        }
        function del(o){
            $(o).parent().remove();
        }
        $("#form1").submit(function(){
            $('input[name="datenum[]"]').each(function(){
                if($(this).val()==''){
                   $(this).parent().remove();
                }
            });
            $('input[name="integral[]"]').each(function(){
                if($(this).val()==''){
                   $(this).parent().remove();
                }
            });
        })
        $('.title > span,.colse').live('click',function(){ 
           window.location.reload();
        })
    </script>
 
</body>
</html>
